﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProductManager.aspx.cs" Inherits="Product_ProductManager" %>
<%@ Import Namespace="WX.WMS.DataModel" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>商品信息管理</title>
    <link href="../css/base.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div align="center"><table style="width:97%;" >
    </table>
        <br />
        <table border="0" style="width: 990px">
            <tr>
                <td class="title" style="width: 934px">
                    商品信息管理
                </td>
            </tr>
            <tr style="width:800px;">
                <td style="width: 934px">
                    搜索条件： &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                    &nbsp; &nbsp;&nbsp; 商品名 &nbsp;
                    <asp:TextBox ID="txtProductName" runat="server" Width="79px"></asp:TextBox>
                    &nbsp; &nbsp; &nbsp; &nbsp;<asp:ImageButton ID="searchButton" runat="server" ImageUrl="~/images/sub_search.gif" OnClick="searchButton_Click" />
                    &nbsp; &nbsp; &nbsp; <input id="btnAdd" onclick="window.location.replace('ProductDetail.aspx?action=add')" type="button"
                        value="添加商品" /></td>
            </tr>
            <tr>
                <td style="width: 934px">
                    <asp:Label ID="Label1" runat="server" Text="没有您要的信息" Visible="False"></asp:Label>
                    <asp:GridView ID="SearchResult" runat="server" AutoGenerateColumns="False"
                            BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px"
                            CellPadding="4" Width="906px" 
                        onpageindexchanging="SearchResult_PageIndexChanging" AllowPaging="True">
                            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="ProductDetail.aspx?action=view&amp;ID={0}"
                                    HeaderText="查看" Target="_blank" Text="&lt;img border=0 src=../images/View.gif /&gt;" />
                                  
                                <asp:BoundField DataField="CODE" HeaderText="编码" SortExpression="CODE" />
                                <asp:BoundField DataField="NAME" HeaderText="名称" SortExpression="NAME" />
                 <asp:TemplateField HeaderText="件数单位" SortExpression="T_UNIT.NAME">
                 <ItemTemplate>
                 <%# ((WX.WMS.DataModel.T_PRODUCT)Container.DataItem) == null || ((WX.WMS.DataModel.T_PRODUCT)Container.DataItem).T_UNIT==null ? "" : ((WX.WMS.DataModel.T_PRODUCT)Container.DataItem).T_UNIT.NAME%>
                 </ItemTemplate>                 
                 </asp:TemplateField>   
                 <asp:TemplateField HeaderText="重量单位" SortExpression="T_UNIT1.NAME">
                 <ItemTemplate>
                 <%#((WX.WMS.DataModel.T_PRODUCT)Container.DataItem)==null||((WX.WMS.DataModel.T_PRODUCT)Container.DataItem).T_UNIT1==null?"":((WX.WMS.DataModel.T_PRODUCT)Container.DataItem).T_UNIT1.NAME%>
                 </ItemTemplate>                 
                 </asp:TemplateField>                                                
<%--                                <asp:BoundField DataField="MODEL" HeaderText="型号" SortExpression="MODEL" />
                                <asp:BoundField DataField="STANDARD" HeaderText="规格" SortExpression="STANDARD" />
                                <asp:BoundField DataField="SIZE" HeaderText="尺寸" SortExpression="SIZE" />
                                <asp:BoundField DataField="ORIGIN" HeaderText="产地" SortExpression="ORIGIN" />
                                <asp:BoundField DataField="BRAND" HeaderText="品牌" SortExpression="BRAND" />--%>
                                <%--<asp:HyperLinkField HeaderText="调价" Text="&lt;img border=0 src=../images/refresh2.gif /&gt;" DataNavigateUrlFields="ProductsID" DataNavigateUrlFormatString="Products_Cost_Set.aspx?ProductsID={0}" />
                                <asp:HyperLinkField HeaderText="上传图片" Text="&lt;img border=0 src=../images/generic.gif /&gt;" DataNavigateUrlFields="ProductsID" DataNavigateUrlFormatString="Products_Photo.aspx?ProductsID={0}">
                                    <HeaderStyle Width="60px" />
                                </asp:HyperLinkField>--%>
                           
                                <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="ProductDetail.aspx?action=edit&amp;ID={0}"
                                    HeaderText="编辑" Text="&lt;img border=0 src=../images/Edit.gif /&gt;">
                                    <ItemStyle Width="30px" />
                                </asp:HyperLinkField>
                                <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="ProductManager.aspx?action=del&amp;ID={0}"
                                    HeaderText="删除"   Text="&lt;img border=0 src=../images/Delete.gif /&gt;">
                                    <ItemStyle Width="30px" />
                                </asp:HyperLinkField>
                            </Columns>
                            <RowStyle BackColor="White" ForeColor="#003399" />
                            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                            <HeaderStyle BackColor="#E2F3FA" Font-Bold="True" ForeColor="Black" />
                     </asp:GridView>
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>

